<?php if(isset($news) && count($news) > 0):?>
<ul class=" bxslider main_s_ul">
    <?php 
        foreach($news as $new):
            $uri = get_base_url() . url_title(trim($new->category), 'dash', TRUE) . '/' . url_title(trim($new->title), 'dash', TRUE) . '-n' . $new->cat_id . '-' . $new->id;
            $thumbnail = ($new->thumbnail1 != '') ? $new->thumbnail1 : '/images/noimage.jpg';
    ?>
        <li class="main_s_li">
            <a href="<?php echo $uri;?>">
                <img src="<?php echo str_replace('/thumbnails', '', $thumbnail);?>" alt="<?php echo $new->title;?>">
            </a>
            <p class="main_s_a">
                <a href="<?php echo $uri;?>"><?php echo $new->title;?></a>
            </p>
            <p class="main_s_p">
                <?php echo shorten_str($new->summary, MAXLENGHT_HP_NEWS_DESCRIPTION);?>
            </p>
        </li>
    <?php endforeach;?>
</ul>
<?endif;?>